package com.kobeliu.controller;

import com.kobeliu.pojo.Stu;
import com.kobeliu.service.StuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/stu1")
@Slf4j
public class HelloController {

    @Autowired
    private StuService stuService;

    @Value("${server.port}")
    private String port;

    @RequestMapping(method = RequestMethod.GET,path = "/hello")
    public Object hello(){


        log.info("======================================");
        log.info("当前服务器所用的端口为：{}",port);
        log.info("======================================");

        return "当前服务器端口为："+port;
    }
}
